package com.ems.dto;

import com.alibaba.fastjson.JSONObject;

import lombok.Data;

@Data
public class DataBean {

	private String clientcode;
	private Integer statsyear;
	private Integer statsmonth;
	private Integer statsday;
	private Integer statshour;
	private Integer stasminute;
	private JSONObject datamap;
	private Long recordtime;

	public String toSql() {
		StringBuilder sql = new StringBuilder();
		sql.append(
				"INSERT into st_client_quarter_data(clientcode,statsyear,statsmonth,statsday,statshour,stasminute,datamap,recordtime) VALUES(");
		sql.append("'").append(clientcode).append("',");
		sql.append(statsyear).append(",");
		sql.append(statsmonth).append(",");
		sql.append(statsday).append(",");
		sql.append(statshour).append(",");
		sql.append(stasminute).append(",");
		sql.append("'").append(datamap.toJSONString()).append("',");
		sql.append(recordtime).append(")");
		return sql.toString();
	}
}
